/*
*
* Copyright (C) 2004 - 2008 BitLaboratory (see http://www.bitlaboratory.com)
* All rights reserved. 
*
* Redistribution and use in source and binary forms, with or without modification, 
* are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
*    this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright notice,
*    this list of conditions and the following disclaimer in the documentation
*    and/or other materials provided with the distribution.
* 3. The name of the author may not be used to endorse or promote products
*    derived from this software without specific prior written permission. 
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED 
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 
* SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT 
* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 
* IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY 
* OF SUCH DAMAGE.
*
* You can find the latest version of this library at http://www.bitlaboratory.com
*
*/


/*
*
* Copyright (C) 2004 - 2008 BitLaboratory (see http://www.bitlaboratory.com)
* All rights reserved. 
*
* Redistribution and use in source and binary forms, with or without modification, 
* are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
*    this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright notice,
*    this list of conditions and the following disclaimer in the documentation
*    and/or other materials provided with the distribution.
* 3. The name of the author may not be used to endorse or promote products
*    derived from this software without specific prior written permission. 
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED 
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 
* SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT 
* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 
* IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY 
* OF SUCH DAMAGE.
*
* You can find the latest version of this library at http://www.bitlaboratory.com
*
*/using System;
using Custom.Win32Api.Types;
using System.Runtime.InteropServices;
using Custom.COM.Types;

namespace Custom.COM.Interfaces
{
	/// <summary>
	/// 
	/// </summary>
	[ComVisible(true), ComImport(),
	Guid("BD3F23C0-D43E-11CF-893B-00AA00BDCE1A"),
	InterfaceTypeAttribute(ComInterfaceType.InterfaceIsIUnknown)]
	public interface IDocHostUIHandler
	{

		[return: MarshalAs(UnmanagedType.I4)][PreserveSig]
		int ShowContextMenu(uint dwID, ref POINT ppt,
			[MarshalAs(UnmanagedType.IUnknown)] object pcmdtReserved,
			[MarshalAs(UnmanagedType.IDispatch)]object pdispReserved);


		[return: MarshalAs(UnmanagedType.I4)][PreserveSig]
		int GetHostInfo([In, Out] DOCHOSTUIINFO info);
		[return: MarshalAs(UnmanagedType.I4)][PreserveSig]
		int ShowUI([In, MarshalAs(UnmanagedType.I4)] int dwID, [In,
			MarshalAs(UnmanagedType.Interface)] IOleInPlaceActiveObject activeObject,
			[In, MarshalAs(UnmanagedType.Interface)] Object /* IOleCommandTarget */
			commandTarget, [In, MarshalAs(UnmanagedType.Interface)] IOleInPlaceFrame
			frame, [In, MarshalAs(UnmanagedType.Interface)] Object doc);
		[return: MarshalAs(UnmanagedType.I4)][PreserveSig]
		int HideUI();
		[return: MarshalAs(UnmanagedType.I4)][PreserveSig]
		int UpdateUI();
		[return: MarshalAs(UnmanagedType.I4)][PreserveSig]
		int EnableModeless([In, MarshalAs(UnmanagedType.Bool)] Boolean fEnable);
		[return: MarshalAs(UnmanagedType.I4)][PreserveSig]
		int OnDocWindowActivate([In, MarshalAs(UnmanagedType.Bool)] bool
			fActivate);
		[return: MarshalAs(UnmanagedType.I4)][PreserveSig]
		int OnFrameWindowActivate([In, MarshalAs(UnmanagedType.Bool)] bool
			fActivate);
		[return: MarshalAs(UnmanagedType.I4)][PreserveSig]
		int ResizeBorder([In] RECT rect, [In] Object doc, [In] Boolean
			fFrameWindow);
		[return: MarshalAs(UnmanagedType.I4)][PreserveSig]
		int TranslateAccelerator([In] MSG msg, [In] ref Guid group, [In,
			MarshalAs(UnmanagedType.I4)] int nCmdID);
			
		
		[return: MarshalAs(UnmanagedType.I4)][PreserveSig]
		int GetOptionKeyPath(out IntPtr pbstrKey, 
			[In, MarshalAs(UnmanagedType.U4)] uint dw);
			
	
		[return: MarshalAs(UnmanagedType.I4)][PreserveSig]
		int GetDropTarget([In, MarshalAs(UnmanagedType.Interface)] Object
			pDropTarget, [Out, MarshalAs(UnmanagedType.Interface)] out Object
			ppDropTarget);
		[return: MarshalAs(UnmanagedType.I4)][PreserveSig]
		int GetExternal([Out, MarshalAs(UnmanagedType.Interface)] out Object
			ppDispatch);
		[return: MarshalAs(UnmanagedType.I4)][PreserveSig]
		int TranslateUrl([In, MarshalAs(UnmanagedType.U4)] int dwTranslate, [In,
			MarshalAs(UnmanagedType.LPWStr)] String strURLIn,[Out,
			MarshalAs(UnmanagedType.LPWStr)] out String pstrURLOut);
		[return: MarshalAs(UnmanagedType.I4)][PreserveSig]
		int FilterDataObject([In, MarshalAs(UnmanagedType.Interface)] Object pDO,
			[Out, MarshalAs(UnmanagedType.Interface)] out Object ppDORet);
	}
}
